Duke Linux VMs: Getting Started
Setting up your Virtual Machine
Go to the Duke Virtual Computing Manager (VCM) web site: https://vcm.duke.edu/ and login with your NetID
Choose the “Reserve a VM” button (Figure 1).
From the next page choose the “Linux” tab (Figure 2).
Choose “Ubuntu Server 22.04” (Figure 3).
- Agree to the Duke VCM Terms of Use
From the VM Management page “Power on” your virtual machine (Figure 4).
When you first reserve your VM it will take a few minutes for the instance to be setup. You will receive an email when your VM is ready to be used.
By default, will power down every morning at 6am. You will need to remember to power on your VM each day.
If you want to keep your VM running continuously than uncheck the “Automatic power downs?” radio button. The VM manager page will ask you to justify this. You can enter text like “Long running jobs”.
Make note of your VM hostname: Your VM’s “hostname” is displayed on the management page. It will be of the form
vcm-XXXX.vm.duke.edu. wherevcm-XXXXis your specific hostname (Figure 4).
Connecting to your VM via SSH
SSH (Secure SHell) is a command line program that allows us to connect to remote computers and to execute commands on those remote computers. SSH is available by default on modern MacOS and Windows operating systems.
Start your terminal (Figure 5).
- MacOS: Run the “Terminal” program
- Windows: Run the “Powershell” program
Run the SSH command (Figure 6).
In the terminal type the following command, replacing
netidwith your NetID andvcm-XXXXwith the appropriate VM hostname as shown in the Duke VM Manager pagessh netid@vcm-XXXX.vm.duke.edu
The first time you connect via SSH you will get a warning message like the following (Figure 7).
This is a safety check; go ahead and type
yesto continue connecting:The authenticity of host 'vcm-XXXX.vm.duke.edu (YY.YY.YY.YY)' can't be established. .... Are you sure you want to continue connecting (yes/no/[fingerprint])?SSH will be prompt you to enter your password. Enter your NetID password here (Figure 8).
IMPORTANT: The characters you type will NOT be echoed on the screen when you type them at the SSH password prompt.
It is important you type your password slowly and correctly. If you miss-enter your password you will get prompted again. After several miss-entries in a row SSH will close the connection as you’ll need to start again from Step 2 above.
Confirm that the SSH command succeeded.
If you correctly entered the SSH command line, and type your password correctly, then you should see welcome text from your VM as shown in Figure 9.
If you did not connect to your VM check the following:
- Did you enter the correct VM hostname?
- Did you specify your NetID in the SSH command?
- Did you enter the correct password (remember, the characters you type will not be echoed)
Run a few test commands on your VM (Figure 10).
Type the following command in your SSH session:
uname -aand
whoamiunameprints out some basic info about your VM’s operating system.whoamireturns the name of the user who executes the command.Create an empty file in your VM’s home directory (Figure 11).
We will create an empty file in your home directory so when we connect via Cyberduck (below) we can confirm that there’s at least one file on our VM.
touch TEST_FILE.txtThe
touchcommand creates an empty file (if the file doesn’t exist) or updates a file’s “timestamp” (when it was last acccessed)
Connecting to your VM via Cyberduck
Cyberduck is a “FTP/SFTP client” – a program that allows us to connect to a remote computer (e.g. your VM) to upload and download files to and from our local computer (e.g. your laptop).
Cyberduck is free to use, though the program will occasionally prompt your for a donation and/or encourage you to register.
Download Cyberduck from https://cyberduck.io/ and install it via the standard program installation procedure on your operating system
Click the “Open Connection” button in Cyberduck (Figure 12)
Change the connection protocol to “SFTP” (Figure 13)
Cyberduck defaults to FTP connections. Choose “SFTP” instead from the pull down menu at the top of the “Open Connections” dialog box.
Fill out the rest of the “Open Connection” dialog box with your VM hostname (
vcm-XXXX.vm.duke.edu), your username (NetID), and password (NetID password) (Figure 14).Once the dialog is filled out click the “Connect” button at the bottom of the dialog.
Check that Cyberduck has connected to your VM (Figure 15).
If you’ve filled out the Open Connection dialog correctly and successfully connected to your VM, then Cyberduck should default to showing the files and directories in your home directory.
If this is the first time you’re connecting, then you should see a single file
TEST_FILE.txt(assuming you followed the prior directions under the SSH section of this document).If you create a file in the command line via SSH, you may need to “Refresh” Cyberduck to get the list of files/directories to update (red arrow in Figure 15).